@import '../fonts/iconfont.css';

/* 基础图标样式 */
.iconfont {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 移动端适配的图标大小 */
.icon-sm {
  font-size: 18px;
}

.icon-md {
  font-size: 22px;
}

.icon-lg {
  font-size: 28px;
}

/* 图标按钮的交互效果 */
.icon-button {
  transition: all 0.2s ease;
  cursor: pointer;

  &:hover {
    opacity: 0.8;
    transform: scale(1.05);
  }

  &:active {
    transform: scale(0.95);
  }
}

/* 特定图标的颜色定义 */
.icon-home {
  color: #ff4e50;
}

.icon-cart {
  color: #4db6ac;
}

.icon-favorite {
  color: #ff6b6b;
}

.icon-user {
  color: #f9d423;
}

/* 移动端底部导航栏图标样式 */
.mobile-nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;

  &.active {
    color: #ff4e50;
  }
}

/* 响应式图标大小 */
@media (max-width: 768px) {
  .icon-sm {
    font-size: 16px;
  }

  .icon-md {
    font-size: 20px;
  }

  .icon-lg {
    font-size: 24px;
  }

  .mobile-nav-icon {
    width: 22px;
    height: 22px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .icon-sm {
    font-size: 14px;
  }

  .icon-md {
    font-size: 18px;
  }

  .icon-lg {
    font-size: 22px;
  }

  .mobile-nav-icon {
    width: 20px;
    height: 20px;
    font-size: 16px;
  }
}
